package com.com.tang;

import com.tang.spi.service.HelloService;
import org.apache.dubbo.common.URL;
import org.apache.dubbo.common.extension.ExtensionLoader;

public class AdaptiveMain {
    public static void main(String[] args) {
        // 没指定 就@SPI上的默认实现
        URL url = URL.valueOf("test://hello");
        HelloService helloService = ExtensionLoader.getExtensionLoader(HelloService.class).getAdaptiveExtension();
        String s = helloService.sayHello(url);
        System.out.println(s);
    }
}
